package richbar.com.richbar.activity.me;

import android.os.Bundle;
import android.view.View;

import com.common.base.BaseActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;
import richbar.com.richbar.R;
import richbar.com.richbar.base.BaseApplication;
import richbar.com.richbar.help.TitleHelp;
import richbar.com.richbar.view.dialog.InputDialog;

/**
 * Created by QiYang on 2018/11/1.
 */

public class PayPwdAc extends BaseActivity {
    @Override
    public int initLayout() {
        return R.layout.ac_pay_pwd;
    }

    @Override
    public void initTitle() {
        new TitleHelp(this).setTitle("支付密码");
    }

    @Override
    public void initView() {
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {

    }

    @OnClick({R.id.change_pay_pwd, R.id.forget_pay_pwd})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.change_pay_pwd:
                start(ChangePayPwdAc.class);
                break;
            case R.id.forget_pay_pwd:
                start(ForgetPayPwdAc.class);
                break;
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        if (BaseApplication.isSetPayPwd.equals("0")) {//未设置支付密码
            InputDialog.shows(PayPwdAc.this, "设置支付密码", new InputDialog.Callbacks() {
                @Override
                public void onBesure(String s) {

                }

                @Override
                public void onCancel() {
                    finish();
                }
            });
        }
    }
}
